A conventional general servo control device, as shown in FIG. 15, includes a servo motor 6 to be controlled, an inverter section for driving the motor 6 by switching transistors 5 through a base drive circuit 4, a CPU 2 for operating position control and speed control, and a current amplifier 3 for issuing a driving command to the base drive circuit 4 in response to the current command received from the CPU 2.
An example of the gain control method in the servo control device is a “system for oscillation detection and speed loop gain automatic adjustment in a servo system” disclosed in JP-A-Hei2-261083. In this case, the servo motor is subjected to stick-stepping so that it is also rotated in an opposite direction. This is repeated to increase the speed loop gain continuously, thereby generating oscillation. The acceleration change obtained by differentiating an actual speed change in the servo motor is frequency-analyzed to detect the oscillation in the servo system. While the oscillation frequency thus obtained and a prescribed reference frequency are being compared with each other, the speed loop gain is adjusted so that the oscillation frequency accords with the reference frequency and becomes a value in vicinity thereof.
Further, in an “automatic adjustment servo control device” disclosed in JP-A-Hei6-242833, in order that the servo motor can follow a change in a load machine connected thereto, the operation of the servo motor is started with an optimum parameter under a predetermined standard load. On the basis of the observation for a predetermined period from when the operation has been started, by integrating a difference between the deviation counter curve during the period and a standard model of the deviation counter curve when the optimum parameter based on a prescribed standard load is used, an actual load is estimated. By referring to a table showing various loads previously created and stored and the corresponding optimum control parameters, the parameter can be changed into the optimum control parameter corresponding to the actual load.
However, as regards the prior arts described above, in the case of JP-A-Hei2-261083, the gain is increased to oscillate the servo system, and the gain when the servo system is oscillated is set as a maximum value.
Specifically, since the parameter adjustment is carried out at the increased gain, there is no margin of the adjustment. Further, since the gain oscillated at a certain place (or position) of a machine is computed, if the place of the machine is shifted, the gain also varies so that there are differences in the gain according to the place of the machine. At a certain position of the machine, vibration occurs.
Further, in the case of JP-A-Hei6-242833, since the observation must be continued for a prescribed period, differences cannot be suppressed according to the place. Further, since only the load varies, accurate adjustment of the parameter cannot be performed.
Therefore, a first object of this invention is to provide a gain adjusting method for a servo control device capable of surely making auto-tuning with no difference according to a place by performing the gain adjustment not only at a specific position of a machine but also over an entire movable range thereof in a servo motor for driving the machine and a servo control device.
Further, in the case of JP-A-Hei2-261083, the gain is increased to oscillate the servo system, and the gain when the servo system is oscillated is set as a maximum value. Namely, taking the machine into consideration at this time, the gain is set at the maximum value or adjusted. Further, in the case of JP-A-Hei6-24283, the state of the load was estimated from the deviation counter, and the control parameter was selected from the state of the load to adjust the controlled gain. Namely, the gain for the position control or speed control was determined according to the load.
Meanwhile, in the prior arts described above, since the oscillation can be observed only after the gain is increased to realize the oscillating state, it takes a long time for the adjustment of the gain. Specifically, while the machine stops, the machine does not oscillate immediately after the gain has been increased. Further, also while the machine runs, it starts to oscillate from points where the oscillation is likely to occur, as indicated by A and B in FIG. 16(i). In other words, since the machine is subjected to friction or load and they act to suppress the oscillation, unless there is a great chance, the oscillation does not occur. Thus, as shown in FIG. 16(ii), in order to cause oscillation easily, it is necessary to expect the time delay until the oscillation starts by issuing a long command at a high speed for each time, thereby increasing the gain slowly so that it is increased only once by a single command. This presents a problem that it takes a long time for the maximum gain to be detected.
FIG. 17 shows the case where the above matter is ignored and the gain has been increased quickly. At timing t1, the gain has been already increased excessively so that at timing t2 when the oscillation is detected, the gain is increased more excessively. Therefore, even when the gain is decreased, as indicated by C in FIG. 17, the oscillation does not stop easily so that the machine vibrates greatly. Also in the case where the machine does not oscillate but a little vibrates, there is slight vibration or noise. This was problematic.
In view of the above matter, a second object of this invention is to vibrate the machine by increasing the gain but to suppress slight vibration while the machine stops, thereby stabilizing the machine.
Further, a third object of this invention is to provide an optimum control method which vibrates the machine by increasing the gain but detects the vibration early to stop the machine instantaneously, thereby not vibrating the machine greatly.
In the prior arts described above, since the controller issued a command, the oscillation or the maximum value of the gain was decided by the controller, thereby performing automatic tuning of the gain. However, because of the data transfer delay between the controller and the servo and since the interval of the processing scan in the controller is later than in the servo, the above decision cannot be made instantaneously to take a long time. Further, even when the oscillation occurs because of a difference in machines, the operation of decreasing the gain cannot be carried out instantaneously.
The invention disclosed in JP-A-Hei6-24283 presents a problem that the above instantaneous decision cannot be made.
In view of this matter, a fourth object of this invention is to determine oscillation in real time by installing the operation sequence of auto-tuning actuated by an external operation into a servo, thereby automatically adjusting servo gain.